package com.hsgene.order.constants.v1;

/**
 * @desc: 患者性别枚举
 * @author: 江承良
 * @date: 2018/9/20 16:23
 */
public enum SexType {
    WOMAN(0,"女"),
    MAN(1,"男");

    private int sexCode;

    private String sexDesc;

    SexType(int sexCode,String sexDesc){
        this.sexCode = sexCode;
        this.sexDesc = sexDesc;
    }

    public static String sex(int sexCode){
        for (SexType sexType : values()) {
            if(sexType.sexCode==sexCode){
                return sexType.sexDesc;
            }
        }
        return null;
    }
}
